#!/usr/bin/env bash

LOG_PATH=./
IPERF=./iperf

function iperf_tcp_server()
{
        ${IPERF} -s -D
}

function iperf_udp_server()
{
        ${IPERF} -u -s -D
}

echo "$(date)" > ${LOG_PATH}/iperf_tcp_server.log
iperf_tcp_server >> ${LOG_PATH}/iperf_tcp_server.log 2>&1
sleep 3
echo "$(date)" > ${LOG_PATH}/iperf_udp_server.log
iperf_udp_server >> ${LOG_PATH}/iperf_udp_server.log 2>&1
